<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>新开就诊</title>
    <link rel="stylesheet" href="/component/pear/css/pear.css"/>
    <style type="text/css">
        * {
            padding: 0px;
            margin: 0px;
        }

        .layui-form-select dl {
            max-height: 170px;
        }

        #case {
            display: inline-block;
            width: 300px;
            height: 70px;
            font-size: 16px;
            margin-left: 20px;
        }
    </style>
</head>
<body class="pear-container">
<div class="layui-container" style="width: 100%;">
    <div class="layui-row">
        <div class="layui-col-md4" style="height:700px;">
            <form class="layui-form layui-form-pane" action="" id="dataFrm" lay-filter="dataFrm">
                <div class="layui-form-item">
                    <div class="layui-form-item layui-inline" style="margin-top: 18px;">
                        <label class="layui-form-label">患者姓名:</label>
                        <div class="layui-input-inline">
                            <input id="id" type="hidden">
                            <input type="text" id="name" name="name" placeholder="请输入患者姓名" class="layui-input"
                                   autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 18px;margin-left: 8px;">
                        <button type="button" class="pear-btn pear-btn-md pear-btn-primary"
                                onclick="loadPatientInfoTwo()">
                            <i class="layui-icon layui-icon-username"></i>
                        </button>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">身份证号:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="idNumber" placeholder="请输入身份证号" class="layui-input"
                                   autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">患者电话:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="phone" placeholder="请输入患者电话" class="layui-input"
                                   autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">性别:</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="sex" value="1" title="男" checked>
                            <input type="radio" name="sex" value="2" title="女">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">出生日期:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="birthday" placeholder="请选择出生日期" id="birthday"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">患者年龄:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="age" placeholder="请输入患者年龄" class="layui-input"
                                   autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">地址信息:</label>
                        <div class="layui-input-inline">
                            <textarea name="address" placeholder="请输入地址信息" class="layui-textarea"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 8px;">
                        <label class="layui-form-label">备注:</label>
                        <div class="layui-input-inline">
                            <textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="layui-col-md8" style="height: 700px;line-height: 0px;">
            <div class="layui-form-item" style="height: 70px;">
                <div id="case">
                    <p style="height: 20px;margin-top: 25px;">挂号单ID:&nbsp;&nbsp;<span id="outpatientId"
                                                                                      style="color: red"></span></p>
                    <p style="height: 20px;">病例编号:&nbsp;&nbsp;<span id="caseId" style="color: red"></span></p>
                </div>
                <div style="height: 70px;width: 200px;
                display: inline-block;position: absolute;left: 70%;">
                    <div class="layui-form-item layui-inline" style="margin-top: 20px;">
                        <button class="pear-btn pear-btn-md pear-btn-primary" onclick="addCase()">
                            <i class="layui-icon layui-icon-username">保存病例</i>
                        </button>
                    </div>
                    <div class="layui-form-item layui-inline" style="margin-top: 20px;">
                        <button class="pear-btn pear-btn-md pear-btn-danger" onclick="seeDoctorSuccess()">
                            <i class="layui-icon layui-icon-username">就诊完成</i>
                        </button>
                    </div>
                </div>
            </div>
            <div style="width: 100%;height: 620px;">
                <div class="layui-tab">
                    <ul class="layui-tab-title">
                        <li class="layui-this">病例</li>
                        <li>处方</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <form class="layui-form " action="" id="dataForm">
                                <div class="layui-form-item">
                                    <div class="layui-form-item layui-inline">
                                        <label class="layui-form-label">发病日期:</label>
                                        <div class="layui-input-inline">
                                            <input type="text" id="morbidity" name="morbidity"  placeholder="请选择发病日期"
                                                   class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item layui-inline">
                                        <label class="layui-form-label">接诊类型:</label>
                                        <div class="layui-input-inline">
                                            <select id="receiveType" name="receiveType">
                                                <option value="">请选择接诊类型</option>
                                                <option value="1">初诊</option>
                                                <option value="2">复诊</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">主诉:</label>
                                        <div class="layui-input-block">
                                            <textarea id = "complaint" name="complaint" placeholder="请输入主诉信息"
                                                      class="layui-textarea"  style="width: 80%;"></textarea>
                                        </div>
                                    </div>
                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">诊断信息:</label>
                                        <div class="layui-input-block">
                                            <textarea id="diagnosisInfo" name="diagnosisInfo" placeholder="请输入诊断信息"
                                                      class="layui-textarea"  style="width: 80%;"></textarea>
                                        </div>
                                    </div>
                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">医生建议:</label>
                                        <div class="layui-input-block">
                                            <textarea name="proposal" placeholder="请输入医生建议"
                                                      class="layui-textarea"  style="width: 80%;"></textarea>
                                        </div>
                                    </div>
                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">备注:</label>
                                        <div class="layui-input-block">
                                            <textarea name="doctorRemark" placeholder="请输入备注信息"
                                                      class="layui-textarea" style="width: 80%;"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="layui-tab-item">
                            <div class="layui-form-item">
                                <div class="layui-form-item layui-inline" style="margin-left: 20px;">
                                    <button class="pear-btn pear-btn-md pear-btn-primary" onclick="addMedication()">
                                        <i class="layui-icon layui-icon-addition">添加药用处方</i>
                                    </button>
                                </div>
                                <div class="layui-form-item layui-inline">
                                    <button class="pear-btn pear-btn-md pear-btn-warming" onclick="addCheck()">
                                        <i class="layui-icon layui-icon-addition">添加检查处方</i>
                                    </button>
                                </div>
                            </div>
                            <div class="layui-collapse">
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">[ 检查处方 ]&nbsp;[ 1 ]&nbsp;[ 处方总额
                                        ]&nbsp;:&nbsp;¥&nbsp;<span id="checkPrice"></span>
                                    </h2>
                                    <div class="layui-colla-content layui-show">
                                        <table id="pre-table" lay-filter="pre-table"></table>
                                    </div>
                                </div>
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">[ 药品处方 ]&nbsp;[ 2 ]&nbsp;[ 处方总额
                                        ]&nbsp;:&nbsp;¥&nbsp;<span id="drugPrice"></span>
                                    </h2>
                                    <div class="layui-colla-content layui-show">
                                        <table id="drugInfo-table" lay-filter="drugInfo-table"></table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--加载患者信息弹出层开始-->
<div style="display: none;padding: 3px" id="loadPatientInfo">
    <table id="patientInfoTable" lay-filter="patientInfoTable"></table>
</div>

<!--行工具栏-->
<script type="text/html" id="seeDoctor-bar">
    <button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="receive"><i
            class="layui-icon layui-icon-ok">接诊</i>
    </button>
</script>
<!--加载患者信息弹出层结束-->

<!--药用处方弹出层-->
<div style="display: none;padding: 3px" id="addDrugInfo">
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">药品名称:</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" placeholder="请输入药品名称"
                           class="layui-input" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item layui-inline">
                <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="drug-query">
                    <i class="layui-icon layui-icon-search"></i>
                    查询
                </button>
                <button type="reset" class="pear-btn pear-btn-md">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button>
            </div>
        </div>
    </form>
    <!-- 数据表格 -->
    <table id="drug-table" lay-filter="drug-table"></table>
</div>

<!--检查处方弹出层-->
<div style="display: none;padding: 3px" id="addCheckInfo">
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">项目名称:</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" placeholder="请输入项目名称"
                           class="layui-input" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item layui-inline">
                <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="inspect-query">
                    <i class="layui-icon layui-icon-search"></i>
                    查询
                </button>
                <button type="reset" class="pear-btn pear-btn-md">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button>
            </div>
        </div>
    </form>
    <!-- 数据表格 -->
    <table id="inspect-table" lay-filter="inspect-table"></table>
</div>

<!--药用表格行工具栏-->
<script type="text/html" id="drugInfo-bar">
    <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
            class="layui-icon layui-icon-delete">删除</i>
    </button>
</script>

<!--检查项表格行工具栏-->
<script type="text/html" id="inspect-bar">
    <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
            class="layui-icon layui-icon-delete">删除</i>
    </button>
</script>


<script src="/component/layui/layui.js"></script>
<script src="/component/pear/pear.js"></script>
<script>
    layui.use(['table', 'form', 'jquery', 'laydate'], function () {
        let table = layui.table;
        let form = layui.form;
        let $ = layui.jquery;
        let laydate = layui.laydate;
        let outpatientId;

        //保存病例
        window.addCase = function () {
            let pantientId = $("#id").val();
            let morbidity = $("#morbidity").val();
            let receiveType = $("#receiveType").val();
            let complaint = $("#complaint").val();
            let diagnosisInfo = $("#diagnosisInfo").val();
            let data = $("#dataForm").serialize();

            if(pantientId == null || pantientId === "" || pantientId === undefined){
                layer.msg("请选择待接诊的患者！");
                return;
            }

            if (morbidity == null ||morbidity ==="" ||morbidity === undefined){
                layer.msg("请选择发病日期！");
                return;
            }

            if (receiveType == null ||receiveType ==="" ||receiveType === undefined){
                layer.msg("请选择接诊类型！");
                return;
            }

            if (complaint == null ||complaint ==="" ||complaint === undefined){
                layer.msg("请填写主诉信息！");
                return;
            }

            if (diagnosisInfo == null ||diagnosisInfo ==="" ||diagnosisInfo === undefined){
                layer.msg("请填写诊断信息！");
                return;
            }

            $.ajax({
                url: "/case/addCase?" + "pantientId=" + pantientId + "&outpatientId=" + outpatientId,
                dataType: "json",
                data: data,
                method: "post",
                success: function (result) {
                    if (result.code == 200) {
                        $("#caseId").text(result.data);
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })

        }

        //就诊完成，修改状态
        window.seeDoctorSuccess = function () {
            $.ajax({
                url: "/case/updateOutpatientState/" + outpatientId,
                dataType: "json",
                method: "post",
                success: function (result) {
                    if (result.code == 200) {
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })
        }

        //加载患者信息
        window.loadPatientInfoTwo = function () {
            let mainIndex = layer.open({
                type: 1,
                title: ['选择挂号患者', 'font-size:16px;text-align: center;'],
                area: ['700px', '400px'],
                content: $("#loadPatientInfo"),
                success: function (index) {
                    // 弹层数据表格的渲染
                    table.render({
                        elem: '#patientInfoTable',
                        url: '/outpatient/loadSeeDoctorPage',
                        cols: [
                            [
                                {
                                    title: '患者姓名',
                                    field: 'patientName',
                                    align: 'center',
                                },
                                {
                                    title: '流水编号',
                                    field: 'number',
                                    align: 'center',
                                },
                                {
                                    title: '挂号类型',
                                    field: 'type',
                                    align: 'center',
                                    templet: function (d) {
                                        let str;
                                        if (d.type == 1) {
                                            str = '<font>门诊</font>';
                                        } else if (d.type == 2) {
                                            str = '<font>急诊</font>';
                                        }
                                        return str;
                                    }
                                },
                                {
                                    title: '操作',
                                    toolbar: '#seeDoctor-bar',
                                    align: 'center',
                                }
                            ]
                        ],
                        page: false,
                        response: {
                            statusCode: 200
                        }
                    });

                    //行监听
                    table.on('tool(patientInfoTable)', function (obj) {
                        if (obj.event === 'receive') {
                            receive(obj);
                        }
                    });

                    //加载患者信息
                    function receive(obj) {
                        let idNumber;
                        $.ajax({
                            url: "/outpatient/selectOutpatientByNumber/" + obj.data['number'],
                            dataType: "json",
                            method: "get",
                            success: function (result) {
                                idNumber = result.data.idNumber;
                                let patient = result.data.patient;
                                outpatientId = result.data.id;
                                $("#outpatientId").text(outpatientId);
                                $("#caseId").text("保存病例后生成");

                                $("#id").val(patient.id);
                                $("[name='idNumber']").val(patient.idNumber);
                                $("#name").val(patient.name);
                                $("[name='phone']").val(patient.phone);
                                $("[name='birthday']").val(patient.birthday);
                                $("[name='age']").val(patient.age);
                                $("[name='address']").val(patient.address);
                                $("[name='remark']").val(patient.remark);
                                $("input[name=sex][value='1']").attr("checked", patient.sex == 1 ? true : false);
                                $("input[name=sex][value='2']").attr("checked", patient.sex == 2 ? true : false);
                                form.render(); //更新全部
                                layer.close(mainIndex);
                            }
                        })
                    }
                }
            });
        }

        //添加药用处方
        window.addMedication = function () {
            let drugIndex = layer.open({
                type: 1,
                title: ['添加药用处方', 'font-size:16px;text-align: center;'],
                area: ['750px', '520px'],
                content: $("#addDrugInfo"),
                btn: ['确认', '取消'],
                btnAlign: 'c',
                success: function (index) {
                    table.render({
                        elem: '#drug-table',
                        url: '/make/loadMakeDrugInfo',
                        cols: [
                            [
                                {type: 'checkbox'},
                                {field: 'id', title: '药品ID', align: 'center', hide: true},
                                {field: 'name', title: '药品名称', align: 'center'},
                                {field: 'inventory', title: '库存量', align: 'center'},
                                {field: 'price', title: '药品价格', align: 'center'},
                                {field: 'company', title: '单位', align: 'center'},
                            ]
                        ],
                        page: true,
                        response: {
                            statusCode: 200
                        }
                    });

                    //表格监听
                    form.on('submit(drug-query)', function (data) {
                        table.reload('drug-table', {
                            where: data.field
                        })
                        return false;
                    });

                },
                yes: function (index, layero) {
                    let checkStatus = table.checkStatus('drug-table');
                    let ids = "outpatientId=" + outpatientId;
                    $.each(checkStatus.data, function (i, item) {
                        ids += "&ids=" + item.id;
                    });
                    $.ajax({
                        url: "/prescription/addDrugPrescription",
                        dataType: 'json',
                        data: ids,
                        type: 'POST',
                        success: function (result) {
                            layer.close(drugIndex);
                            if (result.code == 200) {
                                layer.msg(result.msg, {
                                    icon: 1,
                                    time: 1000
                                });
                                //加载药用处方数据表格
                                table.render({
                                    elem: '#drugInfo-table',
                                    url: '/prescription/loadDrugInfoTable/' + outpatientId,
                                    cols: [
                                        [
                                            {field: 'drugId', title: '药品ID', align: 'center', hide: true},
                                            {field: 'drugName', title: '药品名称', align: 'center'},
                                            {field: 'number', title: '数量', align: 'center', edit: 'text',},
                                            {field: 'price', title: '单价', align: 'center'},
                                            {field: 'money', title: '金额', align: 'center'},
                                            {field: 'remark', title: '服用备注', align: 'center'},
                                            {
                                                field: 'isPay', title: '状态', align: 'center', templet: function (d) {
                                                    let str;
                                                    if (d.isPay == 1) {
                                                        str = '<font>已缴费</font>';
                                                    } else if (d.isPay == 2) {
                                                        str = '<font>未缴费</font>';
                                                    }
                                                    return str;
                                                }
                                            },
                                            {
                                                title: '操作', toolbar: '#drugInfo-bar', align: 'center'
                                            }
                                        ]
                                    ],
                                    page: false,
                                    response: {
                                        statusCode: 200
                                    },
                                    done: function () {
                                        loadDrugMoney();
                                    }
                                });

                            } else {
                                layer.msg(result.msg, {
                                    icon: 2,
                                    time: 1000
                                });
                            }
                        }
                    })
                }
            });
        }

        //加载药用处方总价
        function loadDrugMoney() {
            $.ajax({
                url: "/prescription/loadDrugMoney/" + outpatientId,
                dataType: "json",
                method: "GET",
                success: function (result) {
                    $("#drugPrice").text(result.data);
                }
            })
        }

        //加载检查处方总价
        function loadInspectMoney() {
            $.ajax({
                url: "/prescription/loadInspectMoney/" + outpatientId,
                dataType: "json",
                method: "GET",
                success: function (result) {
                    $("#checkPrice").text(result.data);
                }
            })
        }


        //行监听
        table.on('tool(drugInfo-table)', function (obj) {
            if (obj.event === 'remove') {
                remove(obj);
            }
        });

        //行监听
        table.on('tool(pre-table)', function (obj) {
            if (obj.event === 'remove') {
                removeInspect(obj);
            }
        });

        function removeInspect(obj) {
            $.ajax({
                url: "/prescription/deletePrescriptionByInspectId/" + outpatientId + "/" + obj.data['inspectId'],
                dataType: 'json',
                type: 'DELETE',
                success: function (result) {
                    if (result.code == 200) {
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                        table.reload("pre-table");
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })
        }

        //监听单元格编辑
        table.on('edit(drugInfo-table)', function (obj) {
            $.ajax({
                url: "/prescription/updateDrugTableNumber/" + outpatientId + "/" + obj.data.drugId + "/" + obj.value,
                dataType: 'json',
                type: 'POST',
                success: function (result) {
                    table.reload('drugInfo-table');
                    loadDrugMoney();
                    if (result.code == 200) {
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })

        });

        function remove(obj) {
            $.ajax({
                url: "/prescription/deletePrescription/" + outpatientId + "/" + obj.data['drugId'],
                dataType: 'json',
                type: 'DELETE',
                success: function (result) {
                    if (result.code == 200) {
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                        table.reload("drugInfo-table");
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })
        }

        //添加检查处方
        window.addCheck = function () {
            let checkIndex = layer.open({
                type: 1,
                title: ['添加检查处方', 'font-size:16px;text-align: center;'],
                area: ['750px', '520px'],
                content: $("#addCheckInfo"),
                btn: ['确认', '取消'],
                btnAlign: 'c',
                success: function (index) {
                    table.render({
                        elem: '#inspect-table',
                        url: '/inspect/loadAllInspectPage',
                        cols: [
                            [
                                {type: 'checkbox'},
                                {field: 'id', title: '检查项目ID', align: 'center', hide: true},
                                {field: 'name', title: '药品名称', align: 'center'},
                                {field: 'keyword', title: '关键字', align: 'center'},
                                {field: 'price', title: '项目单价', align: 'center'},
                                {field: 'company', title: '单位', align: 'center'},
                            ]
                        ],
                        page: true,
                        response: {
                            statusCode: 200
                        }
                    });

                    //表格监听
                    form.on('submit(inspect-query)', function (data) {
                        table.reload('inspect-table', {
                            where: data.field
                        })
                        return false;
                    });

                },
                yes: function (index, layero) {
                    let checkStatus = table.checkStatus('inspect-table');
                    let ids = "outpatientId=" + outpatientId;
                    $.each(checkStatus.data, function (i, item) {
                        ids += "&ids=" + item.id;
                    });
                    $.ajax({
                        url: "/prescription/addInspectPrescription",
                        dataType: 'json',
                        data: ids,
                        type: 'POST',
                        success: function (result) {
                            layer.close(checkIndex);
                            if (result.code == 200) {
                                layer.msg(result.msg, {
                                    icon: 1,
                                    time: 1000
                                });
                                //加载检查处方数据表格
                                table.render({
                                    elem: '#pre-table',
                                    url: '/prescription/loadInspectTable/' + outpatientId,
                                    cols: [
                                        [
                                            {field: 'inspectId', title: '检查项ID', align: 'center', hide: true},
                                            {field: 'inspectName', title: '项目名称', align: 'center'},
                                            {field: 'company', title: '单位', align: 'center'},
                                            {field: 'price', title: '单价', align: 'center'},
                                            {field: 'money', title: '金额', align: 'center'},
                                            {field: 'remark', title: '检查备注', align: 'center'},
                                            {
                                                field: 'isPay', title: '状态', align: 'center', templet: function (d) {
                                                    let str;
                                                    if (d.isPay == 1) {
                                                        str = '<font>已缴费</font>';
                                                    } else if (d.isPay == 2) {
                                                        str = '<font>未缴费</font>';
                                                    }
                                                    return str;
                                                }
                                            },
                                            {
                                                title: '操作', toolbar: '#inspect-bar', align: 'center'
                                            }
                                        ]
                                    ],
                                    page: false,
                                    response: {
                                        statusCode: 200
                                    },
                                    done: function () {
                                        loadInspectMoney();
                                    }
                                });
                            } else {
                                layer.msg(result.msg, {
                                    icon: 2,
                                    time: 1000
                                });
                            }
                        }
                    })
                }
            });
        }


        //渲染时间选择器
        laydate.render({
            elem: '#birthday',
        });

        laydate.render({
            elem: '#morbidity',
        });


    })
</script>
</body>
</html>
